<?php
	class DictAction extends Action{
		
		/**
		 * 刷新字典缓存
		 */
		function cache(){
			$dict = D("Dict");
			$list = $dict->findAll();
			for($i = 0; $i < sizeof($list); $i++ ){
				$dict_code = array();
				$dict_code['code'] = $list[$i]['dict_code'];
				$dict_code['name'] = $list[$i]['dict_name'];
				$dict_code['sub_codes'] = $list[$i]['sub_codes'];
//				print_r($dict_code) . '<br />';
				S($list[$i]['dict_code'],$dict_code);
			}
		}
		
	}
?>